package com.walter.db.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author wuchenxi
 * @since 2020-08-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Content implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiParam(name = "id", value = "文章id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 文章标题
     */
    @ApiParam(name = "title", value = "文章标题", required = true)
    @NotEmpty(message = "文章标题不能为空！")
    private String title;

    /**
     * 文章副标题
     */
    @ApiParam(name = "secondTitle", value = "文章副标题")
    private String secondTitle;

    /**
     * 文章链接
     */
    @ApiParam(name = "contentUrl", value = "文章链接", required = true)
    @NotEmpty(message = "文章链接不能为空！")
    private String contentUrl;

    /**
     * 文章类型；1：原创；2：转载
     */
    @ApiParam(name = "type", value = "文章类型；1：原创；2：转载", defaultValue = "1")
    private Integer type;

    /**
     * 发布形式；1：公开；2：私密
     */
    @ApiParam(name = "pushType", value = "发布形式；1：公开；2：私密", defaultValue = "1")
    private Integer pushType;

    /**
     * markdown标签内容
     */
    @ApiParam(hidden = true)
    private String content;

    /**
     * html标签内容
     */
    @ApiParam(hidden = true)
    private String html;

    /**
     * 1：草稿；2：已发布文章；3：删除文章
     */
    @ApiParam(hidden = true)
    private Integer state;

    /**
     * 文章发布时间
     */
    @ApiParam(hidden = true)
    private Date createTime;

    @ApiParam(hidden = true)
    private Date updateTime;
}
